package com.ruoyi.zk.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zk.mapper.ZkCollegelineMapper;
import com.ruoyi.zk.domain.ZkCollegeline;
import com.ruoyi.zk.service.IZkCollegelineService;
import com.ruoyi.common.core.text.Convert;

/**
 * 院校录取分数线Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-18
 */
@Service
public class ZkCollegelineServiceImpl implements IZkCollegelineService 
{
    @Autowired
    private ZkCollegelineMapper zkCollegelineMapper;

    /**
     * 查询院校录取分数线
     * 
     * @param id 院校录取分数线主键
     * @return 院校录取分数线
     */
    @Override
    public ZkCollegeline selectZkCollegelineById(Long id)
    {
        return zkCollegelineMapper.selectZkCollegelineById(id);
    }

    /**
     * 查询院校录取分数线列表
     * 
     * @param zkCollegeline 院校录取分数线
     * @return 院校录取分数线
     */
    @Override
    public List<ZkCollegeline> selectZkCollegelineList(ZkCollegeline zkCollegeline)
    {
        return zkCollegelineMapper.selectZkCollegelineList(zkCollegeline);
    }

    /**
     * 新增院校录取分数线
     * 
     * @param zkCollegeline 院校录取分数线
     * @return 结果
     */
    @Override
    public int insertZkCollegeline(ZkCollegeline zkCollegeline)
    {
        zkCollegeline.setCreateTime(DateUtils.getNowDate());
        return zkCollegelineMapper.insertZkCollegeline(zkCollegeline);
    }

    /**
     * 修改院校录取分数线
     * 
     * @param zkCollegeline 院校录取分数线
     * @return 结果
     */
    @Override
    public int updateZkCollegeline(ZkCollegeline zkCollegeline)
    {
        zkCollegeline.setUpdateTime(DateUtils.getNowDate());
        return zkCollegelineMapper.updateZkCollegeline(zkCollegeline);
    }

    /**
     * 批量删除院校录取分数线
     * 
     * @param ids 需要删除的院校录取分数线主键
     * @return 结果
     */
    @Override
    public int deleteZkCollegelineByIds(String ids)
    {
        return zkCollegelineMapper.deleteZkCollegelineByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除院校录取分数线信息
     * 
     * @param id 院校录取分数线主键
     * @return 结果
     */
    @Override
    public int deleteZkCollegelineById(Long id)
    {
        return zkCollegelineMapper.deleteZkCollegelineById(id);
    }
}
